home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / async.zip / TSR.DOC < prev   
Text File  |  1986-09-07  |  15KB  |  334 lines

  1. ****************************************************************
  2. *                       Version 2.1                            *
  3. *  The TSR package is a group of programs useful in managing   *
  4. *  DOS memory, and in particular managing memory-resident      *
  5. *  utilities. TSR stands for "Terminate and Stay Resident".    *
  6. *                                                              *
  7. ****************************************************************
  8.  
  9. A. MARK, FMARK and RELEASE
  10. ================================================================
  11.  
  12. MARK.COM and RELEASE.COM are used to remove memory-resident
  13. programs from memory, without requiring a system reboot, and
  14. without the usual problems of creating holes or leaving
  15. interrupts dangling. The two programs are used simply as follows:
  16.  
  17. 1) Run the program MARK.COM before installing any memory-
  18.    resident program that you may wish to deinstall later.
  19.    This marks the current position in memory and stores the
  20.    DOS interrupt vector table (all interrupts from 0 to FFH).
  21.  
  22. 2) Install whatever TSRs that you want to use, in the normal
  23.    way that you install them.
  24.  
  25. 3) When you want to deinstall all TSRs above the last MARK,
  26.    run the program RELEASE.COM. This will release all of the
  27.    memory above (and including) the last MARK, and restore
  28.    all interrupt vectors taken over by the memory resident
  29.    programs.
  30.  
  31. MARK and RELEASE can be "stacked" as many times as desired.
  32. RELEASE releases the memory above the last MARK call. MARK uses
  33. about 1600 bytes of memory each time it is called. This 1600
  34. byte region is also released when a RELEASE is done. MARK memory
  35. usage is dominated by the copies of the DOS interrupt vector
  36. table (interrupts 0..FFH) and the copy of the EMS page map
  37. (blocks 0..31 only) which MARK keeps when it goes resident.
  38.  
  39. ================================================================
  40.  
  41. MARK and RELEASE can optionally be called with a single command
  42. line parameter:
  43.  
  44.   MARK MarkName
  45.   RELEASE MarkName
  46.  
  47. In this way a particular mark is given a name. Calling RELEASE
  48. with the same name will release all memory above and including
  49. the mark of that name, also releasing any intermediate marks in
  50. the process. If no mark of the proper name is found, RELEASE
  51. will halt with a warning. A RELEASE call with no MarkName
  52. specified will release the last MARK, whether or not that MARK
  53. was named.
  54.  
  55. The MarkName can be any text string up to 126 characters in
  56. length. It may not contain embedded blanks or tabs. Case (upper
  57. or lower) is not important when matching MarkNames.
  58.  
  59. MarkName supports an additional feature. If the MarkName begins
  60. with ! (exclamation point), then the mark is called a "protected
  61. mark". That mark can be released *only* by an exact match to its
  62. name (including the exclamation point). A protected mark will
  63. NOT be released with an "unnamed" RELEASE. Any named or unnamed
  64. RELEASE will stop without releasing any blocks if it encounters
  65. a protected mark that it does not match exactly.
  66.  
  67. ================================================================
  68.  
  69. As of version 1.4, MARK and RELEASE also control Expanded memory
  70. (Lotus/Intel/Microsoft EMS). They have been tested with READY!
  71. and with the TurboPower Software expanded memory disk cache, as
  72. well as with the device drivers used by the STB Expanded Memory
  73. Card.
  74.  
  75. WARNING: if a resident application allocates expanded memory at
  76. some time *after* going resident and after the last MARK made,
  77. that expanded memory will be released by a call to RELEASE. The
  78. current expanded memory manager (EMM) does not give us enough
  79. information to avoid this possibility. Fortunately, there are no
  80. known memory resident programs which perform this dynamic
  81. allocation of expanded memory. We hope that the EMM will be
  82. upgraded before such applications are designed.
  83.  
  84. ================================================================
  85.  
  86. As of version 1.6, RELEASE takes special precautions to allow it
  87. to release extra invocations of the DOS command processor. In
  88. the simplest form, an extra command processor is obtained by
  89. typing COMMAND at the DOS level. Many multitasking or switching
  90. utilities also utilize this feature of DOS, and these utilities
  91. can now be managed via MARK and RELEASE.
  92.  
  93. ================================================================
  94.  
  95. Due to the way DOS handles batch files, there are certain
  96. limitations on using RELEASE within batch. It is *not* possible
  97. to perform the following sequence of events successfully:
  98.  
  99. First, from the command line:
  100.  
  101.   MARK
  102.   SK      {or any other resident program or programs}
  103.  
  104. Then, within a batch file:
  105.  
  106.   RELEASE {get rid of SK and MARK}
  107.   LOTUS   {run Lotus using the additional memory}
  108.   MARK    {put SK back in place}
  109.   SK
  110.  
  111. DOS allocates a small memory block prior to running any batch
  112. file. It does not allow that block to be deallocated from within
  113. the batch file without various errors occurring. As a result, in
  114. this case the MARK and SK memory blocks are effectively trapped
  115. until the batch file is completed, after which the memory will
  116. be reusable. Indeed, if you run the batch file presented above,
  117. you will get MARK and SK installed above a big hole in memory
  118. left by the previous images of MARK and SK.
  119.  
  120. As of version 1.9, RELEASE guards against this possibility. If
  121. it senses that you are attempting to release memory trapped by a
  122. "batch control block", it writes a warning message to that
  123. effect. It still releases the memory, but when it exits it
  124. passes back a return code of 1 rather than the usual value of 0.
  125.  
  126. It *is* possible to get the desired effect in either of at least
  127. two ways. First, you could make two batch files and call them
  128. one after the other:
  129.  
  130. Batch file #1:
  131.   RELEASE
  132.  
  133. Batch file #2:
  134.   LOTUS
  135.   MARK
  136.   SK
  137.  
  138. In this case, running RELEASE in batch file #1 has the same
  139. effect as running RELEASE from the command line. However,
  140. directly calling the second batch file from the first doesn't
  141. always seem to work either. The only sure bet appears to be the
  142. use of a keypoker like KEY-FAKE or PCED's KEYIN, modifying Batch
  143. #1 as follows:
  144.  
  145.   RELEASE
  146.   KEY-FAKE "batch2" 13
  147.  
  148. A better way to make these things happen is to use the public
  149. domain program CED, or its commercial upgrade PCED. These
  150. programs allow you to define "synonyms" for groups of commands.
  151. The commands execute one after the other just like a batch file.
  152. However, the synonyms do not create an extra batch control
  153. memory block which causes the problems just described.
  154.  
  155. Thus you could make two CED synonyms as follows. (We assume that
  156. the CED "chain character" is ^).
  157.  
  158. SYN LOADSK mark !sk^sk
  159.   {make a protected sidekick marker and load sidekick}
  160.  
  161. SYN RUNLOT release !sk^lotus^mark !sk^sk
  162.   {release sidekick if it's there, run lotus, then reload sidekick}
  163.  
  164. ================================================================
  165.  
  166. As of version 2.0, a new form of marking, called a "file
  167. mark", is also supported. The new mark has the advantage that it
  168. uses only about 150 bytes of memory rather than the 1600 of MARK.
  169.  
  170. The new mark is placed with the command
  171.  
  172.     FMARK [d:][directory]filename
  173.  
  174. The bulk of the vector table and EMS page map are stored in the
  175. file which you specify on the command line rather than in
  176. memory. Note that a command line parameter is *required* in this
  177. case. Otherwise FMARK will halt with an error. The file created
  178. by FMARK will be between 1000 and 2000 bytes in size, depending
  179. on usage of expanded memory.
  180.  
  181. If you might switch drives or directories after using FMARK, you
  182. should specify a complete pathname when FMARK is initially
  183. called. To avoid confusion, you may want to keep the FMARK files
  184. in the root directory, or in a separate directory defined just
  185. for this purpose.
  186.  
  187. The RELEASE program has been upgraded so that it can release
  188. either an in-memory mark (placed by MARK.COM) or a file mark
  189. (placed by FMARK.COM). Use of RELEASE with in-memory marks is
  190. the same as before. To use RELEASE with file marks, call it with
  191. the name of the mark file on the command line:
  192.  
  193.     RELEASE [d:]